<template>
	<view class="page">
		<z-paging ref="paging" style="height: 100%;" :fixed="false" v-model="listData" @query="query"
			:default-page-no="1" :default-page-size="10" @scroll='scroll'>
			<template v-if="loading">
				<teacherCenterSkeleton />
			</template>
			<template v-else>
				<u-navbar leftIconSize='30rpx' @leftClick="$utils.back()" :placeholder="true">
					<view slot='center' class="navTitle">
						<text @click="jumpCenter">个人</text>
						<text class='choose'>家庭</text>
					</view>
				</u-navbar>


			</template>

		</z-paging>
	</view>
</template>

<script>
	import teacherCenterSkeleton from './components/teacherCenterSkeleton.vue'
	export default {
		components: {
			teacherCenterSkeleton,
		},
		data() {
			return {
				loading:false,
				listData:[],
				op: '',
				scrollTop:0
			}
		},
		onLoad(op) {
			this.op = op
			this.getDetail()
		},
		methods: {
			getDetail(){
				this.$api.User.Family(this.op.id)
			},
			query(page, size) {
				this.$refs.paging.complete([])
			
			},
			scroll(event) {
				this.scrollTop = event.detail.scrollTop
			},
			jumpHome() {
				uni.redirectTo({
					url: "/User/center?id=" + this.op.id
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.navTitle {
		font-size: 26rpx;
		font-weight: 600;
	
		>text {
			margin: 0 10rpx;
		}
	}
	.choose {
		font-size: 28rpx;
		color: #3975c6
	}
	.page {
		height: 100vh;
		padding-bottom: constant(safe-area-inset-bottom);
		/* 兼容 iOS 设备 */
		padding-bottom: env(safe-area-inset-bottom);
		/* 兼容 iPhone X 及以上设备 */
		box-sizing: border-box;
	}
</style>